jfxfandomcom-20200214-history
FAQ
General Questions See also the [[Frequently Encountered Issues]] page. What is JavaFX? "JavaFX Script is a declarative, statically typed programming language. It has first-class functions, declarative syntax, list-comprehensions, and incremental dependency-based evaluation." JavaFX Script provides a declarative, non-procedural syntax for diverse operations such as creating 2D animations, setting properties or declaring binding dependencies between model and view objects (to name a few). What does 'declarative syntax' mean? Unlike most languages which rely on procedures and explicit code in order to update relationships between variables or properties a 'declarative' language allows for values to be declared with respect to other languages. An example in JavaFX would be "var a : Number = bind model.attrib/2;" Whenever the value of model.attrib changed then the value of a is automatically and transparently updated without any procedual. This is particularly useful for binding dependencies between model and view objects and with controlling the behaviour of GUIs. What does 'list-comprehensions' mean? List comprehension is the language level support to create and manipulate lists in various ways such as: * var nums = [1,2,3,4]; * var nums2 = [1..4]; //same as above * var numsGreaterThanTwo = nums[. > 2]; * var numsLessThanFour = select n from n in nums where n < 4; What is "incremental dependency-based evaluation"? Attribute values can be declared to be dependent on (bound to) expressions involving other attributes. Thus, when a referenced attribute changes its value all attributes directly or indirectly dependent on them will change their values accordingly *with no intervening procedural logic*. This is similar to the way formula cells in a spreadsheet change their values whenever one or more cells they depend upon change their values. This is especially useful for GUI development where maintaining model and view attributes in sync usually requires complex procedural logic. What is the JavaFX Mobile? What is the licencing model? From the [https://openjfx.dev.java.net/servlets/ReadMsg?list=users&msgNo=308 Mailing list] The current release of JavaFX is under an evaluation license and cannot be redistributed. You can certainly distribute your own JavaFX-based applications without bundling JavaFX, and just point users to the openjfx.org site so they can download the JavaFx binaries themselves. Note, however, that because the JavaFx code is early access under an evaluation license, it isn't licensed for commercial uses. As we develop a commercial product quality release, I will be sure to keep you updated on this alias. Update [https://openjfx.dev.java.net/servlets/ReadMsg?list=users&msgNo=357 Nandini Ramani, 25-May-2007, openjfx user ML] I would like to reiterate that it is perfectly fine to distribute your JavaFX applications, in fact we encourage it. I was just pointing out that it is not yet ready for commercial use. So, Augusto and others are welcome to distribute their applications. Unlike other proprietary companies, we at Sun really do believe in open source and community involvement. I am sorry we do not have a licensing model in place yet, but I assure you that we are working on it and I will keep you all posted as soon as we have one in place. > Does Sun have a timeline for a commercial quality product release of > JavaFX? > > Does Sun have any guidance as to what license the JavaFX Runtime will > be distributed under? As I mentioned above, we don't have a date yet, but we will have one soon. > Is the JavaFX Runtime the same thing as the JavaFX Script which is to > be "open sourced" as per the FAQ? Yes, it is and the runtime will be open sourced. What is the relation between JavaFX and ... ... F3 F3, '''F'''orm '''F'''ollows '''F'''unction, is the former name for the JavaFX platform. ... Java JavaFX is a JSR-223-compliant scripting language. It can use Java classes and can be invoked from java classes. ... SWING JavaFx is a new way of writing Swing application, without knowing the swing architecture and the java language. ... JavaScript? ... AJAX? ... Savage OS? Is JavaFX an RCP (Rich Client Platform)? Yes java can be used for RCP as well as RIA(Rich internet Applications) Can I make a web application with JavaFX? Java Fx can be used to write the front end , the view or the user interface of the web application. Is JavaFX going to replace JSF and JSP in Java EE? No, JSF and JSP can be used to make pure web applications (usable by any HTTP client that supports HTML), while JavaFX needs a JVM on client side. If you want to have a rich client and you can install plugin on client side, JavaFX provides a good Java based alternative to Flash based Adobe Flex and .net based Microsoft Silverlight technologies for rich internet applications. A typical scenario is applications that are developed to run on local interanet of a company. Do I need a server for JavaFX? JavaFX is scripting language with a GUI focus; it is primarily used for desktop applications. No server is required by JavaFX. If you plan on deploying with JNLP (Java Web Start), you would need a web server. What do you I need on client machine to run JavaFX application? How to host a JavaFX application on web server? Where can I find ... for JavaFX? binary distribution source code documentations Tutorials and other training materials * [[Tutorials]] in this wiki * The [http://openjfx.org OpenJFX official page] has tutorials as well. Sample Applications What are available tool supports for JavaFX? Netbeans Eclipse JFXBuilder http://www.reportmill.com/jfx/ See also [[JFXBuilder]] Programming Questions What primitive data types are available? See [[JavaFX Primitive Data Types]] How do I concatenate strings? The + operator doesn't work! See [[String Concatenation]] How do I set up JavaFX for Java Web Start? See the [[JNLP]] tutorial. Note that the current license somewhat restricts redistribution (see ''What is the licencing model?'' above). How do I refer to a fully-qualified java class? Fully qualified Java class names must be enclosed in French quotes << >>. How do I access inner classes and interfaces? At this time you have to use the compiled name of inner classes. For example, import java.util.Map.Entry has to be represented as import java.util.Map$Entry in JavaFX. Also note that to reference the inner class, you will have to continue to use the Outer$Inner syntax. To get around this, you can change the import statement thusly: import java.util.Map$Entry as Entry Can I use Java 5 enumerations? Yes. You can refer to them in the following way: import java.util.management.MemoryType; // an Enum var value = HEAP:MemoryType; // value of the Enum... // HEAP is the enum constant name inside of MemoryType var allValues = MemoryType.values(); // creates a JavaFX array of all enums How can I easily use custom Swing components in JavaFX? See [[Use any swing component]]. Why are some of my .fx files not getting reloaded in JavaFX Pad? From the mailing list: Sorry, JavaFXPad is very limited at the moment. It doesn't detect changes to external files. To make it "see" your changes you'd have to open the changed file in JavaFXPad, and then reopen your original file again. What is the difference between Nodes and Widgets? How do you embed Nodes in Widgets and vice-versa?